//	Company:	HTHK
//	NAME:	    ProjectCategoryOptions.java
//	TITLE:	    The option of Project Category in Time Sheet System
//	FUNCTION:	The option of ProjectCategory associate with the table
//	BY:	        Kodak Xu
//	DATE:	    09/12/2003
// --------------------------------------------------------------
// MODIFICATION HISTORY
// --------------------------------------------------------------
//	CR Log #:  99999  BY:  XXXX   DATE:  dd/mm/yyyy
//	ERROR:	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
//	FIX:	XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// --------------------------------------------------------------

package tss.options;

import tss.common.Options2;
import java.util.ArrayList;
import java.sql.Connection;

import tss.projectcategory.*;

public class ProjectCategoryOptions
  extends Options2
{ 
  public ProjectCategoryOptions() {
      this.load();
  }

  @Override
protected ArrayList createOptions(Connection con)
    throws Exception
  {
      ArrayList options = new ArrayList();
      ProjectCategoryBean ProjectCategory = ProjectCategoryProcess.createBean();
      ProjectCategory.setProject_category_name("");
      ProjectCategoryBean[] ProjectCategorys = ProjectCategoryProcess.find(con,ProjectCategory);
      for (int i=0; i<ProjectCategorys.length; i++)
      {
          Options2.Option option
          = new Options2.Option( ProjectCategorys[i].getProject_category_name(),
                                ProjectCategorys[i].getProject_category_name());
          options.add(i,option);
      }
      return options;
  }
}


